import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'


const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/admin',
    children:[
      {path: '/admin',component: () => import('../views/admin/AdminView.vue')},
      {path: '/adminAdd',component: () => import('../views/admin/AdminAddView.vue')},
      {path: '/pict',component: () => import('../views/admin/PictVIew.vue')},
      {path: '/pictAdd',component: () => import('../views/admin/PictAdd.vue')},
      {path: '/listAdd',component: () => import('../views/admin/AddListView.vue')},
        ]
  },


]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
